package com.sharding.issuse;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@SpringBootApplication
@EnableWebMvc
@ComponentScan("com.*")
@EnableTransactionManagement
public class IssuseApplication implements CommandLineRunner{

	public static void main(String[] args) {
		SpringApplication.run(IssuseApplication.class, args);
	}

	@Override
	public void run(String... strings) throws Exception {
		System.out.println("start sucess!");
		System.out.println("select sample: http://localhost:8081/select");
		System.out.println("nosdSelect sample: http://localhost:8081/nosdSelect");
		System.out.println("nosdSelect sample: http://localhost:8081/updateSdTable");
		System.out.println("nosdSelect sample: http://localhost:8081/testRollBack");
		System.out.println("nosdSelect sample: http://localhost:8081/testNoRollBack");
	}
}
